package com.park.common.poo;

import javax.persistence.*;
import java.math.BigDecimal;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by Administrator on 2017-04-30.
 */
@Entity
@Table(name = "activity_info", schema = "", catalog = "totem")
public class ActivityInfo {
    private Integer activityId;
    private String activityTitle;
    private String activityPic;
    private String activityBody;
    private BigDecimal activityPrice;
    private String activityNotice;
    private String activityLongitude;
    private String activityLatitude;
    private String activityAddress;
    private String activityStatus;
    private String createTime;
    private String updateTime;
    private Integer activitySeq;
    private String activityName;
    private int activityInventory;
    private String activityAbstract;

    public void setActivitySeq(int activitySeq) {
        this.activitySeq = activitySeq;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "activityId")
    public Integer getActivityId() {
        return activityId;
    }

    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    @Basic
    @Column(name = "activityTitle")
    public String getActivityTitle() {
        return activityTitle;
    }

    public void setActivityTitle(String activityTitle) {
        this.activityTitle = activityTitle;
    }

    @Basic
    @Column(name = "activityPic")
    public String getActivityPic() {
        return activityPic;
    }

    public void setActivityPic(String activityPic) {
        this.activityPic = activityPic;
    }

    @Basic
    @Column(name = "activityBody")
    public String getActivityBody() {
        return activityBody;
    }

    public void setActivityBody(String activityBody) {
        this.activityBody = activityBody;
    }

    @Basic
    @Column(name = "activityPrice")
    public BigDecimal getActivityPrice() {
        return activityPrice;
    }

    public void setActivityPrice(BigDecimal activityPrice) {
        this.activityPrice = activityPrice;
    }

    @Basic
    @Column(name = "activityNotice")
    public String getActivityNotice() {
        return activityNotice;
    }

    public void setActivityNotice(String activityNotice) {
        this.activityNotice = activityNotice;
    }

    @Basic
    @Column(name = "activityLongitude")
    public String getActivityLongitude() {
        return activityLongitude;
    }

    public void setActivityLongitude(String activityLongitude) {
        this.activityLongitude = activityLongitude;
    }

    @Basic
    @Column(name = "activityLatitude")
    public String getActivityLatitude() {
        return activityLatitude;
    }

    public void setActivityLatitude(String activityLatitude) {
        this.activityLatitude = activityLatitude;
    }

    @Basic
    @Column(name = "activityAddress")
    public String getActivityAddress() {
        return activityAddress;
    }

    public void setActivityAddress(String activityAddress) {
        this.activityAddress = activityAddress;
    }

    public void setActivitySeq(Integer activitySeq) {
        this.activitySeq = activitySeq;
    }

    @Basic
    @Column(name = "activityStatus")
    public String getActivityStatus() {
        return activityStatus;
    }

    public void setActivityStatus(String activityStatus) {
        this.activityStatus = activityStatus;
    }

    @Basic
    @Column(name = "createTime")
    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "updateTime")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ActivityInfo that = (ActivityInfo) o;

        if (activityId != that.activityId) return false;
        if (activityTitle != null ? !activityTitle.equals(that.activityTitle) : that.activityTitle != null)
            return false;
        if (activityPic != null ? !activityPic.equals(that.activityPic) : that.activityPic != null) return false;
        if (activityBody != null ? !activityBody.equals(that.activityBody) : that.activityBody != null) return false;
        if (activityPrice != null ? !activityPrice.equals(that.activityPrice) : that.activityPrice != null)
            return false;
        if (activityNotice != null ? !activityNotice.equals(that.activityNotice) : that.activityNotice != null)
            return false;
        if (activityLongitude != null ? !activityLongitude.equals(that.activityLongitude) : that.activityLongitude != null)
            return false;
        if (activityLatitude != null ? !activityLatitude.equals(that.activityLatitude) : that.activityLatitude != null)
            return false;
        if (activityStatus != null ? !activityStatus.equals(that.activityStatus) : that.activityStatus != null)
            return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = activityId;
        result = 31 * result + (activityTitle != null ? activityTitle.hashCode() : 0);
        result = 31 * result + (activityPic != null ? activityPic.hashCode() : 0);
        result = 31 * result + (activityBody != null ? activityBody.hashCode() : 0);
        result = 31 * result + (activityPrice != null ? activityPrice.hashCode() : 0);
        result = 31 * result + (activityNotice != null ? activityNotice.hashCode() : 0);
        result = 31 * result + (activityLongitude != null ? activityLongitude.hashCode() : 0);
        result = 31 * result + (activityLatitude != null ? activityLatitude.hashCode() : 0);
        result = 31 * result + (activityStatus != null ? activityStatus.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "activitySeq")
    public int getActivitySeq() {
        return activitySeq;
    }

    @Basic
    @Column(name = "activityName")
    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    @Basic
    @Column(name = "activityInventory")
    public int getActivityInventory() {
        return activityInventory;
    }

    public void setActivityInventory(int activityInventory) {
        this.activityInventory = activityInventory;
    }

    @Basic
    @Column(name = "activityAbstract")
    public String getActivityAbstract() {
        return activityAbstract;
    }

    public void setActivityAbstract(String activityAbstract) {
        this.activityAbstract = activityAbstract;
    }
}
